An animation may be scheduled while the textview content changed in size, so the resize
queued would just unset the animation and set the adjusments with a current value,
defeating gtk_text_view_scroll_to_iter(). In this case, just avoid the adjustment change,
as there is a target value on the way.
https://bugzilla.gnome.org/show_bug.cgi?id=733406
{
return adjustment->priv->duration;
}
+
+gboolean
+gtk_adjustment_is_animating (GtkAdjustment *adjustment)
+{
+ return adjustment->priv->tick_id != 0;
+}
gdouble value);
gdouble gtk_adjustment_get_target_value (GtkAdjustment *adjustment);
+gboolean gtk_adjustment_is_animating (GtkAdjustment *adjustment);
+
G_END_DECLS
gtk_text_view_allocate_children (text_view);
/* Update adjustments */
- gtk_text_view_set_hadjustment_values (text_view);
- gtk_text_view_set_vadjustment_values (text_view);
+ if (!gtk_adjustment_is_animating (priv->hadjustment))
+ gtk_text_view_set_hadjustment_values (text_view);
+ if (!gtk_adjustment_is_animating (priv->vadjustment))
+ gtk_text_view_set_vadjustment_values (text_view);
/* The GTK resize loop processes all the pending exposes right
* after doing the resize stuff, so the idle sizer won't have a